<?php
/* @var $this CatalogController */
/* @var $model Catalog */

$this->breadcrumbs=array(
	'Catalogs'=>array('index'),
	$model->title,
);

$this->menu=array(
	array('label'=>'List Catalog', 'url'=>array('index')),
	array('label'=>'Create Catalog', 'url'=>array('create')),
	array('label'=>'Update Catalog', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete Catalog', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage Catalog', 'url'=>array('admin')),
);
?>
<script src="<?php echo Yii::app()->request->baseUrl; ?>/assets/js/PicturesEditorController.js"></script>
<h1>View Catalog #<?php echo $model->id; ?></h1>
<div ng-app="picturesEditor">
<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'id',
		'title',
		'description',
		'download_url',
		'parent',
		array(
			'name'=>'pictures',
			'type'=>'raw',
			'value'=>'<div class="row" ng-controller="PicturesEditorCtrl" ng-init="init(\'\', \'\', \''.Yii::app()->request->baseUrl.'/\', \''.CHtml::encode(CJSON::encode($model->pictures)).'\')">
		<div class="large-12 columns">
			<div id="uploads" >
				<ul class="clearing-thumbs no-bullet" data-clearing>
					<li class="" ng-repeat="picture in pictures">
						<a class="th" ng-href="{{picture.url}}">
							<img width="100px" ng-src="{{picture.url}}" />
							<input type="hidden" name="pictures[]" ng-value="picture.url" />
						</a>
					</li>
				</ul>
			</div>
		</div>
	</div>'
		)
	),
)); ?>
</div>
